﻿@using BugChang.DES.Web.Mvc.Models.Common
<div class="row">
    <div class="col-xs-2">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">菜单树</h3>
            </div>
            <div class="box-body">
                <ul id="menuTree" class="ztree"></ul>
            </div>
        </div>

    </div>
    <div class="col-xs-10">
        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <div class="btn-group">
                            <button type="button" id="btnAddMenu" class="btn btn-primary" data-toggle="modal" data-target="#MenuCreateModal" data-backdrop="static" data-keyboard="false"><i class="fa  fa-plus-circle"></i> 新增</button>
                        </div>
                    </div>
                    <div class="box-body">
                        <div class="table-responsive">
                            <table id="table" class="table table-bordered table-hover text-nowrap"></table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="MenuCreateModal" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <form id="MenuCreateForm" method="post" asp-controller="Menu" asp-action="Edit">
                @Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel("新增菜单"))
                <div class="modal-body">
                    <div class="form-group">
                        <label>上级菜单</label>
                        <select class="form-control select2" name="ParentId" style="width: 100%"></select>
                    </div>
                    <div class="form-group">
                        <label>名称</label>
                        <input type="text" class="form-control" name="Name">
                    </div>
                    <div class="form-group">
                        <label>描述</label>
                        <textarea class="form-control" name="Description" rows="3" placeholder="描述控制在200字以内"></textarea>
                    </div>
                    <div class="form-group">
                        <label>地址</label>
                        <input type="text" class="form-control" name="Url" placeholder="例:/Home/Index">
                    </div>
                    <div class="form-group">
                        <label>图标</label>
                        <input type="text" class="form-control" name="Icon">
                    </div>
                </div>
                @Html.Partial("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
            </form>
        </div>
    </div>
</div>
<div class="modal fade" id="MenuEditModal" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">

        </div>
    </div>
</div>
@section scripts
    {
    <script src="~/views-resource/menu/index.js" asp-append-version="true"></script>
}